﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="SearchList.aspx.cs" Inherits="NJL.Web.SearchList" %>

<%@ Import Namespace="Royalsoft.Common" %>
<%@ Register Src="Controls/WUCHeader.ascx" TagName="WUCHeader" TagPrefix="uc1" %>
<%@ Register Src="Controls/WUCFooter.ascx" TagName="WUCFooter" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="Styles/base1.css" />
    <script type="text/javascript" language="javascript" src="Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" language="javascript" src="Scripts/jquery.KinSlideshow-1.1.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            if ($('#<%=ddlCity.ClientID%>').val() != "") {
                $('#<%= ddlArea.ClientID%>').show();
            }
            $('#<%=ddlCity.ClientID%>').change(function () {
                if ($('#<%=ddlCity.ClientID%>').val() != "") {
                    $('#<%= ddlArea.ClientID%>').show();
                    $.ajax({
                        type: 'get',
                        url: '/Handle/Handler.ashx',
                        data: 'getAreaId=' + $('#<%=ddlCity.ClientID%>').val(),
                        dataType: 'text',
                        success: function (msg) {
                            document.getElementById("<%=ddlArea.ClientID %>").options.length = 0;
                            if (msg != "false") {
                                var json = eval('(' + msg + ')');
                                var ddlCity = document.getElementById("<%=ddlCity.ClientID%>");
                                var item = null;
                                document.getElementById("<%=ddlArea.ClientID %>").options.add(new Option('--请选择--', ''));
                                for (var i = 0; i < json.length; i++) {
                                    item = new Option(json[i].AreaName, '' + json[i].AreaID);
                                    document.getElementById("<%=ddlArea.ClientID %>").options.add(item);

                                }

                            }
                            else {
                                document.getElementById("<%=ddlArea.ClientID %>").options.add(new Option('--请选择--', ''));
                            }
                        },
                        error: function () {

                        }
                    });
                }
                else {
                    $('#<%= ddlArea.ClientID%>').hide();
                }
            });
            $('#<%=ddlArea.ClientID%>').change(function () {
                $('#<%=hidAreaID.ClientID %>').val($('#<%=ddlArea.ClientID %>').val());
            });
        });
        function fCheckSearch() {

            var hiddenId = '', count = 0;
            var checkbox = $("input[type=checkbox]");
            //alert(checkbox.length);
            for (var i = 0; i < checkbox.length; i++) {
                if (checkbox[i].checked == true) {
                    hiddenId += checkbox[i].value + ",";
                    count++;
                }
            }

            return true;

            if (count == 0) {
                alert('请选择要玩什么？至少选择一个哦！');
                return false;
            }

        }
        function fClearInput() {
            if ($('#<%=txtKeywords.ClientID %>').val() == '试试输入你喜欢的活动，快速找到最好玩的！') {
                $('#<%=txtKeywords.ClientID %>').val('');
            }
        }
        function fLoadInput() {
            if ($('#<%=txtKeywords.ClientID %>').val() == '') {
                $('#<%=txtKeywords.ClientID %>').val('试试输入你喜欢的活动，快速找到最好玩的！');
            }
        }
    </script>
    <script type="text/javascript" language="javascript">
        function tab(div, css) {
            document.getElementById("hot").style.display = "none";
            document.getElementById("news").style.display = "none";
            document.getElementById("hotcss").className = "";
            document.getElementById("newscss").className = "";
            document.getElementById(css).className = "now";
            document.getElementById(div).style.display = "block";
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="hidAreaID" runat="server" />
    <uc1:WUCHeader ID="WUCHeader1" runat="server" />
    <!--主要内容-->
    <div class="clearfix w1003" id="content">
        <div class="place02">
            <p>
                您现在的位置是：<a href="/">首页</a>>><span>搜索结果</span>
            </p>
        </div>
        <!--顶部推广-->
        <div class="blank cleanFlex">
        </div>
        <!--搜索结果-->
        <div class="leftSrarch f_left">
            <div class="leftside box cont" style="width: 715px; overflow: hidden;">
                <!--你想玩什么-->
                <div>
                    <div class="index_title">
                        <h2>
                            <img src="/Images/title_02.jpg" alt="您想玩什么？" /></h2>
                    </div>
                    <div class="playlist">
                        <div style="float: left; width: 75px">
                            <p>
                                <strong>景区活动</strong></p>
                            <p>
                                <strong>娱乐设施</strong></p>
                            <p>
                                <strong>服务项目</strong></p>
                        </div>
                        <div style="float: left; width: 600px">
                            <p>
                                <asp:CheckBoxList ID="cblServiceType" runat="server" RepeatDirection="Horizontal"
                                    Width="100%" RepeatLayout="Flow" RepeatColumns="7">
                                </asp:CheckBoxList>
                            </p>
                        </div>
                        <div style="float: left; width: 100%">
                            <p class="searchbox">
                                <strong>区域选择</strong>
                                <asp:DropDownList ID="ddlCity" runat="server">
                                </asp:DropDownList>
                                <asp:DropDownList ID="ddlArea" runat="server" style="display:none">
                                </asp:DropDownList>
                                <asp:TextBox ID="txtKeywords" Text="试试输入你喜欢的活动，快速找到最好玩的！" runat="server" CssClass="input"
                                    MaxLength="40" size="80" Width="300px" onblur="fLoadInput()" 
                                    onfocus="fClearInput()" />
                                <asp:Button ID="ibtnSearch" runat="server" CssClass="search" OnClientClick="return fCheckSearch();"
                                    OnClick="ibtnSearch_Click" />
                            </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="blank">
            </div>
            <!--结果-->
            <asp:Repeater ID="rptHolidayValla" runat="server" OnItemDataBound="rptHolidayValla_ItemDataBound">
                <ItemTemplate>
                    <div class="boxgray searchbg">
                        <div class="titleSearch cont" style="position: relative;">
                            <span class="f_right">已被关注<%#Eval("VISIT_COUNT")%>次</span>
                            <h2 style="position: relative; height: 28px;">
                                <a target="_blank" class="f_left" href="/shangpu/<%#Eval("ID")%>-index.html" title="<%#Eval("COMPANY_NAME") %>">
                                    <strong>
                                        <%#PageValidate.InputText(Eval("COMPANY_NAME").ToString(),16)%></strong>
                                </a><span class="shop-promise f_left" style="display: none"><b class="cheng"><a href="#"
                                    title="诚信认证"></a></b><b class="shou"><a href="#" title="预定授权"></a></b><b class="zhi">
                                        <a href="#" title="相关资质"></a></b><b class="yu"><a href="#" title="我要预定"></a>
                                    </b></span><span>
                                        <%#Eval("ADDRESS")%></span>
                            </h2>
                        </div>
                        <div class="cont cleanFlex">
                            <ul class="imglist">
                                <asp:Repeater ID="rptService" runat="server">
                                    <ItemTemplate>
                                        <li><a target="_blank" href="/shangpu/<%#Eval("NJL_COMPANY_ID") %>-fuwu-<%#Eval("ID") %>.html"
                                            title="<%#Eval("SERVICE_NAME") %>">
                                            <img width="147px" height="105px" class="picBor" src="<%#GetImageUrl(Eval("IMAGE_CODE").ToString(),"1") %>"
                                                alt="<%#Eval("SERVICE_NAME") %>" title="<%#Eval("SERVICE_NAME") %>" /></a><p>
                                                    <a target="_blank" href="/shangpu/<%#Eval("NJL_COMPANY_ID") %>-fuwu-<%#Eval("ID") %>.html"
                                                        class="green">
                                                        <%#PageValidate.SqlText(Eval("SERVICE_NAME").ToString(),10) %></a></p>
                                            <p style="display: none">
                                                <a href="#">评分：<strong class="orange02">99分</strong></a></p>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                            <!--人均-->
                            <div class="cleanFlex" style="height: 30px;">
                            </div>
                            <div class="evaluate m_top_10" style="display: none">
                                <span class="f_right">综合评分：<strong class="orange04">10分</strong></span>
                                <p>
                                    人均：<strong class="price">68</strong>元</p>
                                <p class="m_top_10">
                                    <%#Eval("COMPANY_INTRO")%>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="cleanFlex m_top_10">
                    </div>
                </ItemTemplate>
            </asp:Repeater>
            <div class="searchpanel" style="display: none;">
                <!--标题-->
                <div class="panel-tt">
                    <span class="panel-tt-l"></span>
                    <h2 class="paneltitle">
                        <a href="#">武汉胜天农庄</a></h2>
                    <span class="panel-tt-r"></span><span class="iconmore f_right"><a href="#" title="详情">
                    </a></span>
                </div>
                <div class="panel-bd">
                    <!--头像-->
                    <div class="farmer-avatar f_left">
                        <a href="#">
                            <img src="Images/ads_12.jpg" alt="" class="picBor" width="160px" height="160px" />
                        </a><span><a href="#">武汉胜天农庄</a></span>
                    </div>
                    <!--服务简介-->
                    <div class="farmer-info f_left">
                        <p>
                            胜天农庄是一家集种植（纯绿色种殖）、养殖、自然风景、名胜古迹、乡村旅游、休闲度假、户外拓展运动、餐饮娱乐等多功能为一体的实业基地，也是武汉市目前唯一的运动型风景区。
                        </p>
                        <div class="hlist">
                            <ul>
                                <li><a href="#">
                                    <img src="Images/ads_16.jpg" alt="" class="picBor" /></a></li>
                                <li><a href="#">
                                    <img src="Images/ads_16.jpg" alt="" class="picBor" /></a></li>
                                <li><a href="#">
                                    <img src="Images/ads_16.jpg" alt="" class="picBor" /></a></li>
                                <li><a href="#">
                                    <img src="Images/ads_16.jpg" alt="" class="picBor" /></a></li>
                            </ul>
                        </div>
                    </div>
                    <!--预定信息-->
                    <div class="book f_left">
                        <h3>
                            预定信息</h3>
                        <table class="tabBord" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <th>
                                    类型
                                </th>
                                <th>
                                    门市价
                                </th>
                                <th>
                                    本店价
                                </th>
                                <th>
                                    支付方式
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    成人票
                                </td>
                                <td>
                                    <del>88</del>
                                </td>
                                <td>
                                    <span class="orange02">￥78</span>
                                </td>
                                <td>
                                    <span class="f_right"><a href="#" class="ding"></a></span>景区现付
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="cleanFlex">
                    </div>
                </div>
            </div>
            <div id="pager" runat="server" class="pageBord cleanFlex m_top_10">
            </div>
        </div>
        <!--右侧-->
        <div class="rightSearch f_right">
            <!--大热门-->
            <div class="box hotinfo">
                <div class="titleTab">
                    <ul>
                        <li class="now" id="hotcss" onmousemove="tab('hot','hotcss')" style="width: 122px;">
                            <a href="#">大热门</a></li>
                        <li id="newscss" onmousemove="tab('news','newscss')" style="width: 122px;"><a href="#">
                            农家资讯</a></li>
                    </ul>
                </div>
                <div class="cont" id="hot">
                    <p>
                        <% 
                            System.Random random = new Random();
                            for (int i = 0; i < LIST_TAG.Count; i++)
                            {
                                int iRandom = random.Next(0, 9);
                        %>
                        <a target="_blank" href="/SearchList.aspx?key=<%=Server.UrlEncode(LIST_TAG[i].TAG) %>&cc=<%=WEBSITE_FOCUS_CITY_NAME_PINYIN%>"
                            class="tag<%=iRandom.ToString() %>">
                            <%=LIST_TAG[i].TAG%>
                        </a>
                        <%
}
                        %>
                    </p>
                </div>
                <div class="cont" id="news" style="display: none;">
                    <ul class="arrowList">
                        <asp:Repeater runat="server" ID="rptNews">
                            <ItemTemplate>
                                <li><a href="News.aspx?id=<%#Eval("ID") %>" title="<%#Eval("NEWS_TITLE") %>" target="_blank">
                                    <%#PageValidate.SqlText(Eval("NEWS_TITLE").ToString(),18)%></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
            </div>
            <!--周边同类-->
            <div class="blank">
            </div>
            <div class="box">
                <div class="titlearrow">
                    <h2>
                        <strong>周边同类</strong></h2>
                </div>
                <div>
                    <%
                        for (int i = 0; i < LIST_COMPANY_NEAR.Count; i++)
                        {
                    %>
                    <dl class="imglist" style="border-bottom: 0; min-height: 80px; height: 100%;">
                        <dt><a target="_blank" title="<%=LIST_COMPANY_NEAR[i].COMPANY_NAME %>" href="/shangpu/<%=LIST_COMPANY_NEAR[i].ID %>-index.html">
                            <img src="<%=GetImageUrl(LIST_COMPANY_NEAR[i].IMAGE_CODE,"4") %>" alt="<%=LIST_COMPANY_NEAR[i].COMPANY_NAME %>"
                                class="picBor" width="107px" height="77px" />
                        </a></dt>
                        <dd>
                            <strong><a target="_blank" title="<%=LIST_COMPANY_NEAR[i].COMPANY_NAME %>" href="/shangpu/<%=LIST_COMPANY_NEAR[i].ID %>-index.html">
                                <%if (LIST_COMPANY_NEAR[i].COMPANY_NAME != null && LIST_COMPANY_NEAR[i].COMPANY_NAME.Length > 6) Response.Write(LIST_COMPANY_NEAR[i].COMPANY_NAME.Substring(0, 6) + "..."); else Response.Write(LIST_COMPANY_NEAR[i].COMPANY_NAME); %>
                            </a></strong>
                        </dd>
                        <dd>
                            <%
                                if (LIST_COMPANY_NEAR[i].COMPANY_INTRO != null)
                                {
                                    if (LIST_COMPANY_NEAR[i].COMPANY_INTRO != null && LIST_COMPANY_NEAR[i].COMPANY_INTRO.Length > 20) Response.Write(LIST_COMPANY_NEAR[i].COMPANY_INTRO.Substring(0, 20) + "..."); else Response.Write(LIST_COMPANY_NEAR[i].COMPANY_INTRO);
                                }
                            %>
                        </dd>
                    </dl>
                    <% 
                        }
                    %>
                </div>
            </div>
            <!--推荐农家菜-->
            <div class="blank">
            </div>
            <div class="tuijian">
                <div class="titletuijian">
                    <p>
                        <a href="#" class="pre"></a><a href="#" class="next"></a>
                    </p>
                </div>
                <img src="Images/ads_31.jpg" alt="" />
            </div>
            <!--景点门票-->
            <div class="blank">
            </div>
            <div class="box">
                <div class="titlearrow">
                    <h2>
                        <strong>景点排行</strong></h2>
                </div>
                <div>
                    <table cellpadding="0" cellspacing="0" width="100%" class="tab02">
                        <%
                            for (int i = 0; i < LIST_ATTRACTION.Count; i++)
                            {
                        %>
                        <tr>
                            <td>
                                <a target="_blank" title="<%=LIST_ATTRACTION[i].ATTRACTION_NAME %>" href="/<%=GetAreaNamePinYin(LIST_ATTRACTION[i].AREA_CODE) %>/jdms/<%=LIST_ATTRACTION[i].ID %>.html">
                                    <%if (LIST_ATTRACTION[i].ATTRACTION_NAME.Length > 16) Response.Write(LIST_ATTRACTION[i].ATTRACTION_NAME + "..."); else Response.Write(LIST_ATTRACTION[i].ATTRACTION_NAME); %>
                                </a>
                            </td>
                        </tr>
                        <% 
                            }
                        %>
                    </table>
                </div>
            </div>
            <!--热门度假山庄-->
            <div class="blank">
            </div>
            <div class="box">
                <div class="titlearrow">
                    <h2>
                        <strong>山庄排行</strong></h2>
                </div>
                <div>
                    <%
                        for (int i = 0; i < LIST_COMPANY_HOT_2.Count; i++)
                        {
                    %>
                    <dl class="imglist" style="border-bottom: 0; min-height: 80px; height: 100%;">
                        <dt><a target="_blank" title="<%=LIST_COMPANY_HOT_2[i].COMPANY_NAME %>" href="/shangpu/<%=LIST_COMPANY_HOT_2[i].ID %>-index.html">
                            <img src="<%=GetImageUrl(LIST_COMPANY_HOT_2[i].IMAGE_CODE,"4") %>" alt="<%=LIST_COMPANY_HOT_2[i].COMPANY_NAME %>"
                                class="picBor" width="107px" height="77px" />
                        </a></dt>
                        <dd>
                            <strong><a target="_blank" class="orange" title="<%=LIST_COMPANY_HOT_2[i].COMPANY_NAME %>"
                                href="/shangpu/<%=LIST_COMPANY_HOT_2[i].ID %>-index.html">
                                <%if (LIST_COMPANY_HOT_2[i].COMPANY_NAME != null && LIST_COMPANY_HOT_2[i].COMPANY_NAME.Length > 6) Response.Write(LIST_COMPANY_HOT_2[i].COMPANY_NAME.Substring(0, 6) + "..."); else Response.Write(LIST_COMPANY_HOT_2[i].COMPANY_NAME); %>
                            </a></strong>
                        </dd>
                        <dd>
                            <%if (LIST_COMPANY_HOT_2[i].COMPANY_INTRO != null && LIST_COMPANY_HOT_2[i].COMPANY_INTRO.Length > 20) Response.Write(LIST_COMPANY_HOT_2[i].COMPANY_INTRO.Substring(0, 20) + "..."); else Response.Write(LIST_COMPANY_HOT_2[i].COMPANY_INTRO); %></dd>
                    </dl>
                    <% 
                        }
                    %>
                </div>
                <div class="cleanFlex">
                </div>
            </div>
        </div>
    </div>
    <div class="blank cleanFlex">
    </div>
    <uc2:WUCFooter ID="WUCFooter1" runat="server" />
    </form>
</body>
</html>
